package com.mtable.entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * MUser entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "m_user", catalog = "mtable")
public class MUser implements java.io.Serializable {

	// Fields

	private Integer userId;
	private String userName;
	private String loginName;
	private String password;
	private Date createTime;

	// Constructors

	/** default constructor */
	public MUser() {
	}

	/** minimal constructor */
	public MUser(String loginName, String password) {
		this.loginName = loginName;
		this.password = password;
	}

	/** full constructor */
	public MUser(String userName, String loginName, String password,
			Date createTime) {
		this.userName = userName;
		this.loginName = loginName;
		this.password = password;
		this.createTime = createTime;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "user_id", unique = true, nullable = false)
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "user_name")
	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "login_name", nullable = false)
	public String getLoginName() {
		return this.loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	@Column(name = "password", nullable = false)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "createTime", length=19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

}